https://github.com/mamedev/mame/blob/master/src/mame/taito/taito_f3.cpp

	ROM_LOAD32_BYTE("e29-12.rom", 0x000000, 0x80000, CRC(9eb19a00) SHA1(5a6417e4377070f9f01110dc6d513d0de01cff1e) )
	ROM_LOAD32_BYTE("e29-11.rom", 0x000001, 0x80000, CRC(e54ada97) SHA1(325e2bc7156656cc262989910dde07a1746cf790) )
	ROM_LOAD32_BYTE("e29-10.rom", 0x000002, 0x80000, CRC(1502a122) SHA1(cb981a4578aa30276c491a0ef47f5e05c05d8b28) )
	ROM_LOAD32_BYTE("e29-16.rom", 0x000003, 0x80000, CRC(aac293da) SHA1(2188d1abe6aeefa872cf16db40999574497d982e) )

	map(0x000000, 0x1fffff).rom();
	map(0x300000, 0x30007f).w(FUNC(taito_f3_state::sound_bankswitch_w));
	map(0x400000, 0x41ffff).mirror(0x20000).ram();
	map(0x440000, 0x447fff).ram().w(FUNC(taito_f3_state::palette_24bit_w)).share("paletteram");
	map(0x4a0000, 0x4a001f).rw(FUNC(taito_f3_state::f3_control_r), FUNC(taito_f3_state::f3_control_w));
	map(0x4c0000, 0x4c0003).w(FUNC(taito_f3_state::f3_unk_w));
	map(0x600000, 0x60ffff).rw(FUNC(taito_f3_state::spriteram_r), FUNC(taito_f3_state::spriteram_w));
	map(0x610000, 0x61bfff).rw(FUNC(taito_f3_state::pf_ram_r), FUNC(taito_f3_state::pf_ram_w));
	map(0x61c000, 0x61dfff).rw(FUNC(taito_f3_state::textram_r), FUNC(taito_f3_state::textram_w));
	map(0x61e000, 0x61ffff).rw(FUNC(taito_f3_state::charram_r), FUNC(taito_f3_state::charram_w));
	map(0x620000, 0x62ffff).rw(FUNC(taito_f3_state::lineram_r), FUNC(taito_f3_state::lineram_w));
	map(0x630000, 0x63ffff).rw(FUNC(taito_f3_state::pivot_r), FUNC(taito_f3_state::pivot_w));
	map(0x660000, 0x66000f).w(FUNC(taito_f3_state::control_0_w));
	map(0x660010, 0x66001f).w(FUNC(taito_f3_state::control_1_w));
	map(0xc00000, 0xc007ff).rw("taito_en:dpram", FUNC(mb8421_device::left_r), FUNC(mb8421_device::left_w));
	map(0xc80000, 0xc80003).w(FUNC(taito_f3_state::sound_reset_0_w));
	map(0xc80100, 0xc80103).w(FUNC(taito_f3_state::sound_reset_1_w));

input:
407954
P1 current bubble color: 413412
P1 preview: 413421
P2 base: 413510

random seed: 405AF6

changes:
decrease # of colors by 1: 7->6 (remove white)
increase connections req by 1: 3->4

turn the guide always on - or make it on if you do a connect of 5 or more? for next shot?
enable dreg character

connections
bp b1724
B1724 change cmpi.b #$3 to #$4

43f773=game state (11 is chrsel)

00407C0C=chrsel timer
subbed at 94d34

4e 71 = nop

pvp at bp a7d3a shows A0 for each mode type as A8042
a8043 = green
a8046 = orange

413420= p1 cursor angle
00=mid
FF=1 to the left
01=1 to the right

credits appear to start at 0x93214 and end at 0x937D3 = 0x5BF space or 1472 bytes
0x305FC has some debug stuff, ends at 0x311DA (careful 311DC and beyond does read)
more credits at 0x52650 until 0x529EC

new inputs:
down=02 -> hold down to show guide
button 2 = 20
button 3 = 40
after input at 407954, gets copied to 407955
also gets copied to 41f831 & 41f832

jumping from b0576 would be nice
need 6 bytes for JSR
can jump from b056e

============
improvements:
*buttons 2 + 3: slight move (increment 1)
*double tap up to go back to neutral
*show guide when shot timer is visible (hide after making shot)
*hold DOWN for X time to switch between preview piece and current piece
(while doing this, make cursor rapidly shift between two values close to center)
(make a sound effect play when switching)
*double tap direction go to max

p1 input 407954
p2 input 407958
jmp=4E F9 XX XX XX XX
B056E=4E F9 00 03 05 FC

413420= P1 cursor angle
00=mid
FF=1 to the left
01=1 to the right
413520= P2 cursor angle
for both players, it's A0 + 10
unified input at 41F831

far left max=C4 (C3 too far)
far right max=3C (3D too far)

for double tap of left, right, and up, i think i'm gonna need 2 bytes for each. 1 byte to store how long since they pressed that direction (so it'll start at let's say 5 and count down 1 each frame), and another byte to see if they are not currently holding that direction (yes or no). might be a better way to do it but i'm not sure
so for example when player presses up once, they set byte A5(A0) to 05 and A6(A0) to 01
then later if the player presses up and A5 is not zero and A6 is zero, then set cursor to straight upwards position (0x00)

up direction is code 01

407954 has input (non-unified) P1
407958 has input (non-unified) P2

left=4
right=8
===
shot timer at 413464 (P1) - it's a word
when 413465 > F0, it's displaying hurry up

P1 guide = 41F836
P2 guide = 41F837

if it's 02, then safe to set it to 82
otherwise do nothing
=====
down input = 02
======
is 3c72 for sound? yes
b0692 = cursor moving sound P1
b059a = shooting sound P1
b06A2 = also cursor moving sound (P2?)
b05ae = shoot sound P2

sound call seems to have 3 aspects:
1) move.w #0x?,-(SP)
2) jsr 3c72
3) lea (0x2,SP),SP

========
lets use 4134BA for sound (can use for both players)

bp 3c80,1,{d0==1A}

sound index:
0 - silence
1 - ? related to shooting
2-P1 cursor sound
3-same as 6
4- bubble shot
5-P2 cursor sound
6-same as 3
7- good for double tap up, ziiwut
8-weird noise
9- ball shot?
a- nothing?
b- minor popping noise - could be good for swapping
c-
d-
e-
f-
10-
11-
12-landing and moving into place (tiny noise)
14- matched and popping?
15-credit enter noise/chara selected
16-mode has been chosen
17-
18-after pressed start (could be used for swap)
19-
1A- "Hurry Up" countdown noise
1C-sword clashing noise
1D-
1E-
1F-
20-
21-
22-
25-
2a-
2d-
31-
32-
34-
35-
39-
3A- GO
3B-
3C- dinosaur call in the intro
45-
4B-
4C-
52-
53-desune (in the intro)
55-
64-
69-
6a-
6b-
af-
B0-
B1-
b2-

actions that need sounds:
double tap up - 07
nudge left & right - 1B
oscillate down - B0 is good, F is ok, 1D is ok (almost silent)
switch - 18, 1E, 0B
===========
405BE1 coins
26F8 = write coins on insert coins
282A = write coins on use coin
282A 4 bytes subq.w -> replace with nop nop

mode select stuff around 40b03c
mode cursor = 40b039 (00 puzz, 01 player vs comp, 02 pvp)
same value for difficulty select

956b0 sets 40b039 to 01 by default (mode=player vs computer)
9599A updates it every frame

default mode: change 956B3 from 01 to 02

957ec writes 01 for normal difficulty select

407c0c timer for mode select (word)
407C0C sets to FF FF to go forward

9570A sets default timer 0293  for mode select
95856 sets default timer 0293 for difficulty select

956b0 happens before 9570A, so we can set 9570a to write FF FF and it auto sets pvp

94D1C = writes 0293 to chr sel timer